-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GitHub Actions diagnostics flag in CI #453
base: main
Are you sure you want to change the base?
Conversation
Found an issue:
Docs aren't specific about which variable this is stored in, a search on github suggested |
Let's squash this one. |
That's odd, the random test failure we usually only see on WinUI 3 has happened on UWP now:
Linking #347 and rerunning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, can we test turning the flag on now that it has run first, where's the checkbox for that?
And then are the logs just the normal logs or are there extras elsewhere we should know about?
Co-authored-by: Arlo <[email protected]>
Kicked off here: https://github.com/CommunityToolkit/Windows/actions/runs/9896968654 - looking good so far, will see if it picks that up from the env, will be nice to see that off by default to get some brevity back in our builds. We can at least use this to further tweak the amount of output we do too in the future. Nice! |
@Arlodotexe so I see the debug info from GitHub, but it didn't seem to enable the flag? It also feels like even when it's off the msbuild details are pretty huge, should we be minimal by default and on normal or detailed or something when the flag is on? |
.github/workflows/build.yml
Outdated
ENABLE_DIAGNOSTICS: true | ||
# Debug logging enabled via GitHub UI during reruns or set as repo secret. | ||
# See also https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging | ||
ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_RUNNER_DEBUG }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, doesn't seem to be picking it up, should it just be a straight ACTIONS_RUNNER_DEBUG
or secrets.ACTIONS_RUNNER_DEBUG
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, just found this, it may just be ${{ runner.debug }}
https://stackoverflow.com/questions/75434105/how-to-determine-if-the-github-action-is-running-with-debug-logging-enabled
From runner context doc - https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context - this seems to be what corresponds to the checkbox. Not sure what that other doc is about...
We should update the comment too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the originally linked docs, I think I see why ACTIONS_RUNNER_DEBUG
didn't enable verbose logging. From the docs:
Runner diagnostic logging provides additional log files that contain information about how a runner is executing a job. Two extra log files are added to the log archive:
- The runner process log, which includes information about coordinating and setting up runners to execute jobs.
- The worker process log, which logs the execution of a job.
Maybe we need to enable step debug logging instead via ACTIONS_STEP_DEBUG
, which:
- increases the verbosity of a job's logs during and after a job's execution.
As for the runner.debug
context value, the docs for this seem to point to the same docs used before 🤔
We can try both, but let's start with ACTIONS_STEP_DEBUG
and see if that works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_RUNNER_DEBUG }} | |
ENABLE_DIAGNOSTICS: ${{ github.ACTIONS_STEP_DEBUG }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like ACTIONS_STEP_DEBUG
didn't do it either, let's try runner.debug
then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posted here as well, but runner.debug
didn't work as expected. runner
isn't recognized.
@Arlodotexe WinUI 3 tests failed, I'll ask some folks what we can do or who we can ask for more assistance in root causing that for them. Doesn't look like that flag did anything, though not sure if once checked it remains checked? Or did you kick off a run with it? Otherwise, we should try the other runner context |
That's odd, I guess docs are outdated? Error message from last run:
|
ENABLE_DIAGNOSTICS: true | ||
# Debug logging enabled via GitHub UI during reruns or set as repo secret. | ||
# See also https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging | ||
ENABLE_DIAGNOSTICS: ${{ runner.debug }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is only available in the jobs section where the runner is used? As maybe it's per runner of a job vs. the whole workflow right? Otherwise, we should open an issue on https://github.com/actions/runner/issues as it's clearly listed in the documentation, just not with a great example...
Using the guidance in https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging, this PR disables verbose diagnostic logging in CI except when "Enable Debug Logging" is checked on a rerun.